package com.ptszyxx.popose.module.main.mine.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.ptszyxx.popose.R;
import com.ptszyxx.popose.databinding.ItemMineInviteIncomeBinding;
import com.ptszyxx.popose.module.main.mine.vm.MineInviteVM;
import com.ysg.http.data.entity.mine.InviteIncomeEntity;

public class MineIncomeAdapter extends BaseQuickAdapter<InviteIncomeEntity, BaseDataBindingHolder<ItemMineInviteIncomeBinding>> {

    private MineInviteVM viewModel;

    public MineIncomeAdapter(MineInviteVM viewModel) {
        super(R.layout.item_mine_invite_income);
        this.viewModel = viewModel;
    }

    @Override
    protected void convert(BaseDataBindingHolder<ItemMineInviteIncomeBinding> holder, InviteIncomeEntity item) {
        ItemMineInviteIncomeBinding binding = holder.getDataBinding();
        if (binding != null) {
            binding.setEntity(item);
            binding.setPosition(holder.getBindingAdapterPosition() + 1);
            binding.executePendingBindings();
        }
    }








}
